
<div class="col-sm-12">
  <div class="box">
  	<!-- BOX-BODY -->
  	<div class="box-body">
    <div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
      <div class="row ">
          <div class="col-sm-9 nopadding-right nopadding-left">
            {{callbusi/time-search class="inline-block" text='按订餐日期搜索' dateShow=dateShow chooseDate=chooseDate search="search"
            submmit="submmit" emptied='emptied' changeBeginDateAction='changeBeginDateAction' changeEndDateAction='changeEndDateAction'}}
          </div>
        <div class="user-add-btn col-sm-3 pull-right nopadding-right" >
          {{#ui/mix-button class=" user-btn pull-right" iconClass="fa-plus"  text='新增订餐信息'  clickAction="toAddFoodPlan" toAddFoodPlan="toAddFoodPlan"}}
          {{/ui/mix-button}}
        </div>
      </div>
          <table id="datatable1" cellpadding="0" cellspacing="0" border="0"  class="datatable table table-bordered table-hover dataTable mt15" aria-describedby="datatable1_info">
            <thead>
              <tr role="row">
                <th rowspan="1" colspan="1" width="">订餐日期</th>
                <th rowspan="1" colspan="1" width="">操作人</th>
                {{#each foodTimeList as |foodTime|}}
                <th rowspan="1" colspan="1" width="">{{foodTime.typename}}</th>
                {{/each}}
              </tr>
            </thead>
            {{#if foodplanList}}
          <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
              {{#each foodplanList as |foodplan|}}
              <tr class="gradeA odd" {{action "toDetailPage" foodplan on="click"}}>
                <td class=" ellipsis sorting_1">{{foodplan.diningDateStr}}</td>
                <td class=" ellipsis ">{{foodplan.createUser.name}}</td>
                {{#each foodplan.tableList as |list|}}
                  <td class=" ellipsis " style='max-width:200px;'><div  class="nowrap" title={{list}}>{{list}}</div></td>
                {{/each}}
          	  </tr>
              {{/each}}
           </tbody>
           {{else}}
           {{/if}}
            </table>
      {{#if foodplanList }}
          {{page-numbers content=foodplanList showFL=true numPagesToShow=3}}
      {{else}}
          <h1 class="col-sm-12 center unTask"></h1>
      {{/if}}
    </div>
    </div>
  </div>
</div>

{{#if addFoodPlanModel}}
	{{#bs-modal body=false footer=false header=false closedAction=(action "invitation")}}

		{{#bs-modal-header}}
			<h3 class="modal-title">新增订餐</h3>
		{{/bs-modal-header}}
		{{#bs-modal-body}}
    {{#bs-form formLayout=formLayout model=foodplanModel invalid=(action "invalid")}}
        <div class="col-xs-12 nopadding-horizontal">
  					<div class="form-input-group">
  						<span class="input-group-addon">订餐日期：</span>
                {{#bs-form-element class="inline-block form-input-group" controlType="diningDate"  property="diningDate" }}
                  {{ui/addon/bs-datetimepicker date=foodplanModel.diningDateTime placeholder=""
                  locale="zh-CN" iconClasses="fa fa-calendar" format='YYYY-MM-DD'
                  show="dpShowAction" change="changeDiningDateAction" }}
                {{/bs-form-element}}
  					</div>
  				</div>
      {{/bs-form}}
		{{/bs-modal-body}}
		{{#bs-modal-footer class="user-add-btn confirmCreate"}}
      {{#ui/mix-button class="user-btn edit-btn"  iconClass="fa fa-save"  text='确定' clickAction="saveNewFoodPlan" saveNewFoodPlan="saveNewFoodPlan"}}
      {{/ui/mix-button}}
      {{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="invitation" invitation="invitation"}}
      {{/ui/mix-button}}
		{{/bs-modal-footer}}
	{{/bs-modal}}
{{/if}}
